package cn.wolfcode.luowowo.article.service.impl;

import cn.wolfcode.luowowo.article.domain.Scenery;
import cn.wolfcode.luowowo.article.domain.Strategy;
import cn.wolfcode.luowowo.article.mapper.SceneryMapper;
import cn.wolfcode.luowowo.article.service.ISceneryService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class SceneryServiceImpl implements ISceneryService {
    @Autowired
    private SceneryMapper sceneryMapper;

    @Override
    public List<Scenery> getTop5(Long destId) {
        List<Scenery> list = sceneryMapper.selectTop5(destId);
        return list;
    }

    @Override
    public List<Scenery> list() {
        List<Scenery> list = sceneryMapper.selectAll();
        return list;
    }

    @Override
    public List<Scenery> getHotScenery(Long id) {
        List<Scenery> list = sceneryMapper.selectHotScenery(id);
        return list;
    }

    @Override
    public Scenery getSceneryById(Long id) {
        return sceneryMapper.selectByPrimaryKey(id);
    }
}
